package org.lab.mtga.core.guice;

import org.lab.mtga.core.jpa.EntityManagerProvider;
import org.lab.mtga.core.parser.DeckParser;
import org.lab.mtga.core.parser.MtgoParser;
import org.lab.mtga.core.services.CardRepository;
import org.lab.mtga.core.services.impl.DBCardRepository;

import com.google.inject.AbstractModule;

public class MTGACoreModule extends AbstractModule {

	@Override
	protected void configure() {
		// CsvCardRepository cardRepository = new CsvCardRepository();
		// cardRepository.init(getClass().getResourceAsStream("/database/cards.csv"));
		bind(CardRepository.class).to(DBCardRepository.class);

		bind(DeckParser.class).to(MtgoParser.class);
		bind(EntityManagerProvider.class).toInstance(new EntityManagerProvider("com.lab.mtga.core"));
	}
}
